import request from '@/utils/request'

// 查询培训人员列表
export function listRecord(query) {
  return request({
    url: '/train/record/list',
    method: 'get',
    params: query
  })
}

// 查询培训人员详细信息列表
export function listDetail(query) {
  return request({
    url: '/train/record/listDetail',
    method: 'get',
    params: query
  })
}

// 查询培训申请人员详细信息列表
export function listTrailDetail(query) {
  return request({
    url: '/train/record/listTrailDetail',
    method: 'get',
    params: query
  })
}
// 查询培训人员详细
export function getRecord(id) {
  return request({
    url: '/train/record/' + id,
    method: 'get'
  })
}

// 新增培训人员
export function addRecord(data) {
  return request({
    url: '/train/record',
    method: 'post',
    data: data
  })
}

// 申请培训
export function apply(data) {
  return request({
    url: '/train/record/apply',
    method: 'post',
    data: data
  })
}

// 修改培训人员
export function updateRecord(data) {
  return request({
    url: '/train/record',
    method: 'put',
    data: data
  })
}

// 删除培训人员
export function delRecord(id) {
  return request({
    url: '/train/record/' + id,
    method: 'delete'
  })
}
